// 订单页
import mongoose from 'mongoose'
import Model from './model'
const orderSchema = new mongoose.Schema({
  id: {
    type: String,
    require: true
  },
  total: {
    type: Number,
    require: true
  },
  imgs: {
    type: Array,
    require: true
  },
  name: {
    type: String,
    require: true
  },
  status: {
    type: Number,
    require: true
  },
  user: {
    type: String,
    require: true
  },
  add_time: {
    type: String,
    require: true
  }
})

class orderModel extends Model {
  constructor(connection, schema, name) {
    super(connection, schema, name)
  }
  
}

export default new orderModel(mongoose, orderSchema, 'orders')
